package com.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.dao.UserDao;
import com.entity.User;
import com.entity.Pagination;

@Service
public class UserServiceImp implements UserService {
	@Autowired
	private UserDao UserDao;

	@Override
	public List<User> getAllUsers(Pagination pagination,User User) {
		return UserDao.getAllUsers(pagination,User);
	}

	@Override
	public Integer insertUser(User User) {
		return UserDao.insertUser(User);
		
	}

	@Override
	public Integer deleteUser(User User) {
		return UserDao.deleteUser(User);
	}

	@Override
	public int countAll(User User) {
		return UserDao.countAll(User);
	}

	@Override
	public Integer updateUser(User User) {
		return UserDao.updateUser(User);
	}

	@Override
	public User findById(Integer id) {
		return UserDao.findById(id);
	}

	@Override
	public User findUser(User user) {
		return UserDao.findUser(user);
	}
}
